package com.bw.module_device.repo

import com.bw.lib_common.model.BaseRepository
import com.bw.lib_http.OkHttpClientManager
import com.bw.module_device.api.DeviceApiService
import com.bw.module_device.entity.DeviceResult
/**
 * 智慧园区-01-设备管理-v1.1-吴熙-20250507
 */
class DeviceRepo: BaseRepository<DeviceApiService>() {
    override fun createApiServer(): DeviceApiService = OkHttpClientManager.retrofitInstance.create(DeviceApiService::class.java)

    suspend fun getDeviceList() = apiService.getDeviceList()
    suspend fun addDevice(deviceResult: DeviceResult) = apiService.addDevice(deviceResult)
    suspend fun getDeviceDetail(deviceId:Int) = apiService.getDeviceDetail(deviceId)

    suspend fun deleteDevice(deviceId:Int) = apiService.deleteDevice(deviceId)
}